package com.lanou.dormitory.service;



import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lanou.dormitory.dao.CompanyMapper;
import com.lanou.dormitory.entity.Company;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lanou.dormitory.dao.CompanyMapper;
import com.lanou.dormitory.entity.Company;
@Service
public class CompanyServiceImpl implements CompanyService {
	@Autowired
	private CompanyMapper companyMapper;
	
	@Override
	public List<Company> getAll() {
		return companyMapper.getAll();
	}
	

	@Override
	public Company getCompayByName(String cname) {
		return companyMapper.getCompayByName(cname);
	}

	@Override
	public void add(String cname, String cnote) {
		
		companyMapper.add(cname, cnote);
	}
	@Override
	public Company getById(Integer cid) {
		return companyMapper.getById(cid);
	}

	@Override
	public void update(Company com) {
		companyMapper.update(com);
		
	}

	@Override
	public void delById(Integer cid) {
		companyMapper.delById(cid);
		
	}

}
